import Vue from 'vue'
import Router from 'vue-router'
import login from '@/views/login/login'
import Home from '@/views/Home'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/login',
      name: 'login',
      component: login
    },
    {
      path: '/',
      name: 'Home',
      component: Home,
      children: [
        {
          path: '/user',
          name: 'user',
          component: () => import('../views/menu/user')
        },
        {
          path: '/user1',
          name: 'user1',
          component: () => import('../views/menu/user1')
        }
      ]
    }
  ]
})
